using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FreeLancer.HRB.Core;

namespace FreeLancer.HRB.WebApp.UserControls
{
  public partial class NewsBrowser : System.Web.UI.UserControl
  {
    public bool PagerVisible
    {
      get { return ASPxNewsControl.PagerSettings.Visible; }
      set { ASPxNewsControl.PagerSettings.Visible = value; }
    }

    public int RowPerPage
    {
      get { return ASPxNewsControl.RowPerPage; }
      set { ASPxNewsControl.RowPerPage = value; }
    }

    public bool MoreNewsVisible
    {
      get { return divMoreNews.Visible; }
      set { divMoreNews.Visible = value; }
    }

    public string DataSourceId
    {
      get { return ASPxNewsControl.DataSourceID; }
      set { ASPxNewsControl.DataSourceID = value; }
    }

    public string MoreNewsHref
    {
      get { return anchorMoreNews.HRef; }
      set { anchorMoreNews.HRef = value; }
    }

    public string TextField
    {
      get { return ASPxNewsControl.TextField; }
      set { ASPxNewsControl.TextField = value; }
    }

    public bool EncodeHtml
    {
      get { return ASPxNewsControl.EncodeHtml; }
      set { ASPxNewsControl.EncodeHtml = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
      ASPxNewsControl.NavigateUrlFormatString = Utils.RelativeWebRoot + "Post.aspx?id={0}";
    }
  }
}